{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-02-27T01:15:37.579933Z",
     "start_time": "2025-02-27T01:15:36.890108Z"
    }
   },
   "source": [
    "from pyecharts.charts import Line\n",
    "line=Line()\n",
    "line.add_xaxis([\"中国\",\"美国\",\"英国\"])\n",
    "line.add_yaxis(\"GDP\",[30,20,10])\n",
    "line.render()"
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'D:\\\\python\\\\code\\\\TestCode\\\\Python-learn\\\\Python基础综合案例\\\\render.html'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 1
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-27T01:39:35.287784Z",
     "start_time": "2025-02-27T01:39:35.252972Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from pyecharts.charts import Line\n",
    "from pyecharts.options import TitleOpts,LegendOpts,ToolboxOpts,VisualMapOpts,TooltipOpts\n",
    "\n",
    "line=Line()\n",
    "line.add_xaxis([\"中国\",\"美国\",\"英国\"])\n",
    "line.add_yaxis(\"GDP\",[30,20,10])\n",
    "line.set_global_opts(\n",
    "    title_opts=TitleOpts(\"测试\",pos_left=\"center\",pos_bottom=\"1%\"),\n",
    "    legend_opts=LegendOpts(is_show=True),\n",
    "    toolbox_opts=ToolboxOpts(is_show=True),\n",
    "    visualmap_opts=VisualMapOpts(is_show=True),\n",
    "    tooltip_opts=TooltipOpts(is_show=True)\n",
    ")\n",
    "line.render()"
   ],
   "id": "880134ac78ae3999",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'D:\\\\python\\\\code\\\\TestCode\\\\Python-learn\\\\Python基础综合案例\\\\render.html'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 2
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
